/*
 * Copyright 2004 original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jbfilter.core.fcomps.wrapper;

import org.jbfilter.core.CleaningStrategy;
import org.jbfilter.core.EnableStrategy;
import org.jbfilter.core.FilterComponent;
/**
 * Application writers can extend this class when they need to provide
 * additional functionality to an {@link FilterComponent}.
 * @author Marcus Adrian
 * @param <E> the type of the objects the filter component is conceived for
 */
public abstract class DefaultFilterComponentWrapper<E> implements FilterComponent<E> {

	private FilterComponent<E> filterComponent;
	
	public DefaultFilterComponentWrapper(FilterComponent<E> filterComponent) {
		super();
		this.filterComponent = filterComponent;
	}
	@Override
	public void setEnabled(boolean enabled) {
		filterComponent.setEnabled(enabled);
	}
	@Override
	public boolean isEnabled() {
		return filterComponent.isEnabled();
	}
	@Override
	public boolean isActive() {
		return filterComponent.isActive();
	}
	@Override
	public void clean() {
		filterComponent.clean();
	}
	@Override
	public void setCleaningStrategy(CleaningStrategy cleaningStrategy) {
		filterComponent.setCleaningStrategy(cleaningStrategy);
	}
	@Override
	public String getId() {
		return filterComponent.getId();
	}
	@Override
	public void setId(String id) {
		filterComponent.setId(id);
	}
	@Override
	public boolean isInverted() {
		return filterComponent.isInverted();
	}
	@Override
	public void setInverted(boolean inverted) {
		filterComponent.setInverted(inverted);
	}
	@Override
	public void setEnableStrategy(EnableStrategy enableStrategy) {
		filterComponent.setEnableStrategy(enableStrategy);
	}
	@Override
	public CleaningStrategy getCleaningStrategy() {
		return filterComponent.getCleaningStrategy();
	}
	@Override
	public EnableStrategy getEnableStrategy() {
		return filterComponent.getEnableStrategy();
	}
}
